package cn.iocoder.mall.shop.service.mapper;

import cn.iocoder.mall.shop.service.entities.ShopCategory;
import cn.iocoder.mall.shop.service.entities.ShopCategoryRelationship;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :ssf
 * @date :2019/11/26
 * 商铺商品与条目关联关系映射类
 */
@Mapper
public interface ShopCategoryRelationshipMapper {
    /**
     * 保存商品id与条目id到关系表中
     * @param relationship
     */
    void saveCategoryAndSpuId(@Param("relationship") ShopCategoryRelationship relationship);
    /**
     * 删除商品id与条目id的关系1
     * @param spuId
     */
    void deleteCategoryAndSpuId(@Param("spuId") long spuId);
    /**
     * 批量删除商品id与条目id的关系
     * @param spuIds
     */
    void deleteCategoryAndSpuIds(@Param("spuIds") List<String> spuIds);

    IPage<Long> pageListOfCategory(Page page, @Param("id") String categoryId);

}
